home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / rpg_scrl / readme.txt < prev    next >
Text File  |  1994-09-20  |  6KB  |  119 lines

  1.                        Generic Scrolling Tile Based Demo
  2.  
  3. What Is This?
  4. =============
  5. This is some sample code in Pascal 6.0 to show how to do some scrolling
  6. like the Ultima-type games do it. This demo is in 256-color mode 13h
  7. and is non-interactive. Source is included with some documentation
  8. for easy modification.
  9.  
  10. How Do I Use It?
  11. ================
  12. Just type test. This file will need several .til files (the pictures)
  13. so make sure they're there (everything you need should be present
  14. in this archive). The file will show a man walking along a river
  15. side, moving forward 4 pixels at a time. If you want to change this,
  16. you can type test <step size> and he will walk that number of
  17. pixels per step (ie., test 1 will have the hero walk 1 pixel for 
  18. each step). 
  19.  
  20. If the demo is too slow or too fast, well, I haven't done
  21. anything to control that yet. The delay between steps is stored
  22. in the walk procedure (bottom of the file) and is currently set
  23. to 400ms between steps. That's great for 486, but I have to change
  24. that to 100ms and recompile for my 386.
  25.  
  26. Press <ESC> to quit - the hero has to finish his 32 pixel journey so
  27. there may be some delay. Really, I promise, I didn't disable the
  28. keyboard or anything like that.
  29.  
  30. Application
  31. ===========
  32. This code will show you how to 1)Use a virtual buffer (which is 
  33. good for flicker-free animation), 2)Use animated tiles (like a
  34. man who moves his arms when he walks and water that waves),
  35. 3)Scroll a tiled screen pixel by pixel and 4)Learn a little
  36. assembler. 
  37.  
  38. With a decent understanding of the few assembler routines (which
  39. are documented in the programr.txt file), you should be able to
  40. rip out and modify the assembler animation/drawing routines
  41. to use in your own applications. Hopefully you know enough about
  42. programming to handle the other little things (like declaring a
  43. datatype/object/record holding a hero's name and hitpoints or
  44. whatever) to make something useful with this.
  45.  
  46. Limitations
  47. ===========
  48. Well, for starters, the hero only walks straight up. Why? Because
  49. if he walked sideways or down, I'd have to draw more pictures.
  50. Second, it doesn't respond to the keyboard (outside of quitting).
  51. This is because I didn't want to fool around pressing keys while
  52. debugging this. It should be easy to add keyboard input
  53. ie.,   while not Done do
  54.        begin
  55.     if keypressed
  56.             begin
  57.               ch:=readkey;
  58.               if ch=Up_Arrow then Walk(Up)
  59.                  else if ch=Down_Arrow then etc...
  60.             end
  61.         Animate Icons
  62.         ShowHiddenBuffer
  63.       end;
  64. The next limitation is the map size - for this demo it's really small
  65. (you can make your own map by just modifying the array size). It might
  66. seem endless because of a cheating little trick I put in (which is
  67. nice for people writing background scrollers like Galaga) - when the
  68. hero walks forward 3 steps, he is looped back 3 steps (which looks
  69. exactly like his previous location so you can't tell he jumped).
  70. You'll notice the map is a pointer - that's because if you use too
  71. many non-pointer variables you get out of variable space errors
  72. or data segment overflow errors (the data portion of pascal .exe
  73. files can only hold 64k of variable declarations, about a map
  74. size of 256x256).
  75.  
  76. One real big limitation is that I'm not the world's hottest
  77. programmer (or speller) so not everything here is neccesarily
  78. accurate, but I figure it comes close.
  79.  
  80. Legal Matters
  81. =============
  82. I reserve my rights to this, which my lawyer tells me is unecessary
  83. as I automatically keep my rights unless I explicitly give them away.
  84. I don't care if you use this code (there's not enough here to write
  85. a game - you still have to be creative and invest some time) but
  86. I would really hate it if you stole my code word-for-word and claim
  87. it's yours or try and sell it (I've seen this happen). 
  88.  
  89. Also, it works on my machine. It didn't format my harddrive or
  90. blow up my monitor or anything like that. But you never know
  91. how other people's computers are, so I won't claim that this
  92. software won't damage your system - it could very well blow a hole
  93. through your monitor, although if it did I'd like to know how
  94. it happened.
  95.  
  96. Everyone adds this legal stuff at the end of their file as if
  97. they had the money to enforce it or the constant need to use
  98. it. I figure we, like lemmings, just do it because everyone else
  99. did it. Be cool about things and I figure no one will care.
  100.  
  101. Oh yeah, I work in a computer department at my company. I also
  102. signed some papers or another saying anything I do work related
  103. on the side is their property (greedy bastards, aren't they?). So
  104. I'll just mention that my job does not involve programming, and
  105. I've been doing this game programming bit long before I ever 
  106. worked here and signed silly papers. I did not use their machines,
  107. their compilers or their time (hell, they owe me overtime I figure).
  108. I didn't recieve any education from this for them, and when I 
  109. volunteer my spare time at home to write for them it's normally
  110. visual basic and powerbuilder. So I doubt this simple source 
  111. code violates any agreement I signed. If so, I'm off to jail :)
  112.  
  113. Comments?
  114. =========
  115. If you have any comments, I can be reached at cbwetzel@mmm.com
  116. Some people have problem emailing me - I haven't a clue
  117. why except that maybe my company is new to this stuff. I'll
  118. answer basic questions and flames and such if you have them,
  119. although with a new baby I can be slow to respond sometimes.